package controllers;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;

import dto.FolderDTO;

import beans.FolderBeanRemote;


/**
 * 
 * @author Zsombor
 *
 */
@ManagedBean
public class FolderDTOController {

	@EJB
	FolderBeanRemote feb;

	@ManagedProperty(value = "#{folder}")
	FolderDTO foDto;

	public FolderDTO getFoDto() {
		return foDto;
	}

	public void setFoDto(FolderDTO foDto) {
		this.foDto = foDto;
	}
	
	public String createFolder(){
		
		feb.createFolder(foDto);
		
		return "ok";
	}
	
	public String deleteFolder(){
		
		feb.deleteFolder(foDto);
		
		return "ok";
	}
	
}
